import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Mine from '@/components/Mine'
import InterfaceListForm from '@/components/sections/InterfaceListForm.vue'
import HomeForm from '@/components/sections/HomeForm.vue'
import MarketForm from '@/components/sections/MarketForm.vue'
import HorseForm from '@/components/sections/HorseForm.vue'
import MatchForm from '@/components/sections/MatchForm.vue'

Vue.use(Router)

export default new Router({
  routes: [
    // 首页模块
    {
      mode: 'history',
      path: '/',
      name: 'Root',
      component: Home,
      meta: { view: HomeForm }
    },
    {
      mode: 'history',
      path: '/home',
      name: 'Home',
      component: Home,
      meta: { view: HomeForm }
    },
    {
      mode: 'history',
      path: '/horse',
      name: 'Horse',
      component: Home,
      meta: { view: HorseForm }
    },
    {
      mode: 'history',
      path: '/market',
      name: 'Market',
      component: Home,
      meta: { view: MarketForm }
    },
    {
      mode: 'history',
      path: '/match',
      name: 'Match',
      component: Home,
      meta: { view: MatchForm }
    },
    // 我模块
    {
      mode: 'history',
      path: '/interface-list',
      name: 'InterfaceList',
      component: Mine,
      meta: { view: InterfaceListForm }
    }
  ]
})
